﻿using DevAge.ComponentModel;
using SourceGrid;
using SourceGrid.Cells.Controllers;
using ZeBobo5.LibraryHelper.Core.Grid.Controllers;

namespace ZeBobo5.LibraryHelper.Core.Grid.Controllers
{
    public class ValueChangingController : ControllerBase
    {
        public static readonly ValueChangingController Default = new ValueChangingController();

        public override void OnValueChanging(CellContext sender, ValueEventArgs e)
        {
            if (sender.Grid is IValueChangingControllerEvent)
            {
                ((IValueChangingControllerEvent) sender.Grid).OnValueChangingEvent(sender, e);
            }
            base.OnValueChanged(sender, e);
        }
    }
}